package zhaoq_hero.superapp;

import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import zhaoq_hero.superapp.interfaces.MyCallBack;

/**
 * ProjectName : zhaoq_hero.superapp
 * Created by : zhaoQiang
 * Email : zhaoq_hero163.com
 * On 2015/11/1 // 20:08
 */
public class MyChromClient extends WebChromeClient {

    private MyCallBack callback;

    public MyChromClient(MyCallBack callback) {
        this.callback = callback;
    }

    @Override
    public void onProgressChanged(WebView view, int newProgress) {
        if (callback != null) {
            callback.onProgressChanged(newProgress);
        }
    }

    @Override
    public void onReceivedTitle(WebView view, String title) {
        if (callback != null) {

            callback.onReceivedTitle(title);
        }
    }


    @Override
    public void getVisitedHistory(ValueCallback<String[]> callback) {
        super.getVisitedHistory(callback);
    }
}
